﻿using System;
using System.Collections.Generic;
using System.Reflection;
using MugenInjection.Core;
using MugenInjection.Delegates;
using MugenInjection.Infrastructure;
using MugenInjection.Interface;
using MugenInjection.Interface.Components;
using MugenInjection.Scope;
using MugenInjection.Syntax;
using MugenInjection.Syntax.Type;

namespace MugenInjection
{
    /// <summary>
    /// The standard implementation of a <see cref="IInjector"/>.
    /// </summary>
    public class MugenInjector : InjectorBase
    {
        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(params IInjectorModule[] modules)
            : this(new DefaultInjectorSetting(), modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        /// <param name="components">The specified <see cref="IComponent"/>(s).</param>
        public MugenInjector(IEnumerable<IComponent> components, params IInjectorModule[] modules)
            : this(new DefaultInjectorSetting(), new ComponentContainer(), components, modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="settings">The settings for creating <see cref="MugenInjector"/>.</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(IInjectorSettings settings, params IInjectorModule[] modules)
            : this(settings, new ComponentContainer(), modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="componentContainer">The specified <see cref="IComponentContainer"/> </param>
        /// <param name="settings">Settings for creating <see cref="MugenInjector"/>.</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(IInjectorSettings settings, IComponentContainer componentContainer,
                             params IInjectorModule[] modules)
            : this(null, settings, componentContainer, modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="componentContainer">The specified <see cref="IComponentContainer"/> </param>
        /// <param name="settings">Settings for creating <see cref="MugenInjector"/>.</param>
        /// <param name="components">The specified <see cref="IComponent"/>(s).</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(IInjectorSettings settings, IComponentContainer componentContainer,
                             IEnumerable<IComponent> components, params IInjectorModule[] modules)
            : this(null, settings, componentContainer, components, modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="injector">The parent <see cref="IInjector"/>.</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(IInjector injector, params IInjectorModule[] modules)
            : this(injector, injector.Settings.Clone(), new ComponentContainer(), modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="injector">The parent <see cref="IInjector"/>.</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        /// <param name="components">The specified <see cref="IComponent"/>(s).</param>
        public MugenInjector(IInjector injector, IEnumerable<IComponent> components, params IInjectorModule[] modules)
            : this(injector, injector.Settings.Clone(), new ComponentContainer(), components, modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="injector">The parent <see cref="IInjector"/>.</param>
        /// <param name="settings">Settings for creating <see cref="MugenInjector"/>.</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(IInjector injector, IInjectorSettings settings, params IInjectorModule[] modules)
            : this(injector, settings, new ComponentContainer(), modules)
        {
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="injector">The parent <see cref="IInjector"/>.</param>
        /// <param name="componentContainerContainer"> </param>
        /// <param name="settings">Settings for creating <see cref="MugenInjector"/>.</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(IInjector injector, IInjectorSettings settings,
                             IComponentContainer componentContainerContainer, params IInjectorModule[] modules)
            : base(injector, settings, componentContainerContainer, null)
        {
            if (modules == null) return;
            this.Load(modules);
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MugenInjector" /> class.
        /// </summary>
        /// <param name="injector">The parent <see cref="IInjector"/>.</param>
        /// <param name="componentContainerContainer"> </param>
        /// <param name="settings">Settings for creating <see cref="MugenInjector"/>.</param>
        /// <param name="components">The specified <see cref="IComponent"/>(s). Can be null.</param>
        /// <param name="modules">The specified <see cref="InjectorModule"/>s.</param>
        public MugenInjector(IInjector injector, IInjectorSettings settings,
                             IComponentContainer componentContainerContainer, IEnumerable<IComponent> components,
                             params IInjectorModule[] modules)
            : base(injector, settings, componentContainerContainer, components)
        {
            if (modules == null) return;
            this.Load(modules);
        }

        #endregion

        #region Method

#if NET2

        #region Get

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>An instance of the service.</returns>
        public object Get(Type service, object key, IDictionary<string, object> specialParameters = null,
                          params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Get(this, service, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>An instance of the service.</returns>
        public object Get(Type service, IDictionary<string, object> specialParameters,
                          params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.Get(this, service, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>An instance of the service.</returns>
        public object Get(Type service, params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.Get(this, service, null, null, InjectorUtilsInternal.ReadOnlyEmptyDictionary,
                                              parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="key">The specified binding key.</param>
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>An instance of the service.</returns>
        public object GetInto(Type service, object key, MemberInfo member, ParameterInfo parameter = null,
                              IDictionary<string, object> specialParameters = null,
                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Get(this, service, member, parameter, specialParameters, parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection. </param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>An instance of the service.</returns>
        public object GetInto(Type service, MemberInfo member, ParameterInfo parameter = null,
                              IDictionary<string, object> specialParameters = null,
                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.Get(this, service, member, parameter, specialParameters, parameters);
        }

        //------------

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="key">The specified binding key.</param>
        /// <returns>An instance of the service.</returns>
        public T Get<T>(object key, IDictionary<string, object> specialParameters = null,
                        params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return (T)InjectorExtensionUtils.Get(this, typeof(T), null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>An instance of the service.</returns>
        public T Get<T>(IDictionary<string, object> specialParameters, params IInjectionParameter[] parameters)
        {
            return (T)InjectorExtensionUtils.Get(this, typeof(T), null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>An instance of the service.</returns>
        public T Get<T>(params IInjectionParameter[] parameters)
        {
            return
                (T)
                InjectorExtensionUtils.Get(this, typeof(T), null, null, InjectorUtilsInternal.ReadOnlyEmptyDictionary,
                                           parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="key">The specified binding key.</param>
        /// <returns>An instance of the service.</returns>
        public T GetInto<T>(object key, MemberInfo member, ParameterInfo parameter = null,
                            IDictionary<string, object> specialParameters = null,
                            params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return (T)InjectorExtensionUtils.Get(this, typeof(T), member, parameter, specialParameters, parameters);
        }

        /// <summary>
        /// Gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <returns>An instance of the service.</returns>
        public T GetInto<T>(MemberInfo member, ParameterInfo parameter = null,
                            IDictionary<string, object> specialParameters = null,
                            params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return (T)InjectorExtensionUtils.Get(this, typeof(T), member, parameter, specialParameters, parameters);
        }

        #endregion

        #region Try get

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <param name="result">An instance of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGet(Type service, out object result, object key,
                           IDictionary<string, object> specialParameters = null, params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGet(this, out result, service, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <param name="result">An instance of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGet(Type service, out object result, IDictionary<string, object> specialParameters,
                           params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGet(this, out result, service, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <param name="result">An instance of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGet(Type service, out object result, params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGet(this, out result, service, null, null,
                                                 InjectorUtilsInternal.ReadOnlyEmptyDictionary, parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <param name="result">An instance of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="member"><see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="key">The specified binding key.</param>
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetInto(Type service, out object result, object key, MemberInfo member,
                               ParameterInfo parameter = null, IDictionary<string, object> specialParameters = null,
                               params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGet(this, out result, service, member, parameter, specialParameters,
                                                 parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <param name="result">An instance of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetInto(Type service, out object result, MemberInfo member, ParameterInfo parameter = null,
                               IDictionary<string, object> specialParameters = null,
                               params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.TryGet(this, out result, service, member, parameter, specialParameters,
                                                 parameters);
        }

        //------------

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="result">An instance of the service.</param>
        /// <param name="key">The specified binding key.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGet<T>(out T result, object key, IDictionary<string, object> specialParameters = null,
                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGet(this, out result, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="result">An instance of the service.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGet<T>(out T result, IDictionary<string, object> specialParameters,
                              params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGet(this, out result, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="result">An instance of the service.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGet<T>(out T result, params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGet(this, out result, null, null,
                                                 InjectorUtilsInternal.ReadOnlyEmptyDictionary, parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="result">An instance of the service.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="key">The specified binding key.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetInto<T>(out T result, object key, MemberInfo member, ParameterInfo parameter = null,
                                  IDictionary<string, object> specialParameters = null,
                                  params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGet(this, out result, member, parameter, specialParameters, parameters);
        }

        /// <summary>
        /// Try gets an instance of the specified service.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="parameters">The specified parameters.</param>
        /// <param name="result">An instance of the service.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetInto<T>(out T result, MemberInfo member, ParameterInfo parameter = null,
                                  IDictionary<string, object> specialParameters = null,
                                  params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.TryGet(this, out result, member, parameter, specialParameters, parameters);
        }

        #endregion

        #region Get all in current

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAllInCurrent(Type service, object key,
                                                   IDictionary<string, object> specialParameters = null,
                                                   params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.GetAllInCurrent(this, service, null, null, specialParameters, false,
                                                          parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAllInCurrent(Type service, IDictionary<string, object> specialParameters,
                                                   params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.GetAllInCurrent(this, service, null, null, specialParameters, false,
                                                          parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAllInCurrent(Type service, params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.GetAllInCurrent(this, service, null, null,
                                                          InjectorUtilsInternal.ReadOnlyEmptyDictionary, true,
                                                          parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAllInCurrentInto(Type service, object key, MemberInfo member,
                                                       ParameterInfo parameter = null,
                                                       IDictionary<string, object> specialParameters = null,
                                                       params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.GetAllInCurrent(this, service, member, parameter, specialParameters, false,
                                                          parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAllInCurrentInto(Type service, MemberInfo member, ParameterInfo parameter = null,
                                                       IDictionary<string, object> specialParameters = null,
                                                       params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.GetAllInCurrent(this, service, member, parameter, specialParameters, false,
                                                          parameters);
        }

        //-----------

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAllInCurrent<T>(object key, IDictionary<string, object> specialParameters = null,
                                                 params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAllInCurrent(this, typeof(T), null, null, specialParameters,
                                                                false, parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAllInCurrent<T>(IDictionary<string, object> specialParameters,
                                                 params IInjectionParameter[] parameters)
        {
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAllInCurrent(this, typeof(T), null, null, specialParameters, false,
                                                                parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAllInCurrent<T>(params IInjectionParameter[] parameters)
        {
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAllInCurrent(this, typeof(T), null, null,
                                                                InjectorUtilsInternal.ReadOnlyEmptyDictionary, true,
                                                                parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAllInCurrentInto<T>(object key, MemberInfo member, ParameterInfo parameter = null,
                                                     IDictionary<string, object> specialParameters = null,
                                                     params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAllInCurrent(this, typeof(T), member, parameter, specialParameters,
                                                                false, parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAllInCurrentInto<T>(MemberInfo member, ParameterInfo parameter = null,
                                                     IDictionary<string, object> specialParameters = null,
                                                     params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAllInCurrent(this, typeof(T), member, parameter, specialParameters,
                                                                false, parameters));
        }

        #endregion

        #region Try get all in current

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrent(Type service, out IEnumerable<object> result,
                                       object key, IDictionary<string, object> specialParameters = null,
                                       params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, service, null, null,
                                                             specialParameters, false, parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrent(Type service, out IEnumerable<object> result,
                                       IDictionary<string, object> specialParameters,
                                       params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, service, null, null,
                                                             specialParameters, false, parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrent(Type service, out IEnumerable<object> result,
                                       params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, service, null, null,
                                                             InjectorUtilsInternal.ReadOnlyEmptyDictionary, true,
                                                             parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection. </param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrentInto(Type service, out IEnumerable<object> result,
                                           object key, MemberInfo member, ParameterInfo parameter = null,
                                           IDictionary<string, object> specialParameters = null,
                                           params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, service, member, parameter,
                                                             specialParameters, false, parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrentInto(Type service, out IEnumerable<object> result, MemberInfo member,
                                           ParameterInfo parameter = null,
                                           IDictionary<string, object> specialParameters = null,
                                           params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, service, member, parameter,
                                                             specialParameters, false, parameters);
        }

        //-----

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrent<T>(out IEnumerable<T> result, object key,
                                          IDictionary<string, object> specialParameters = null,
                                          params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, null, null, specialParameters, false,
                                                             parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrent<T>(out IEnumerable<T> result,
                                          IDictionary<string, object> specialParameters,
                                          params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, null, null, specialParameters, false,
                                                             parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrent<T>(out IEnumerable<T> result, params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, null, null,
                                                             InjectorUtilsInternal.ReadOnlyEmptyDictionary, true,
                                                             parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrentInto<T>(out IEnumerable<T> result, object key, MemberInfo member,
                                              ParameterInfo parameter = null,
                                              IDictionary<string, object> specialParameters = null,
                                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, member, parameter, specialParameters,
                                                             false,
                                                             parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjectorResolver"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection. </param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInCurrentInto<T>(out IEnumerable<T> result, MemberInfo member,
                                              ParameterInfo parameter = null,
                                              IDictionary<string, object> specialParameters = null,
                                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.TryGetAllInCurrent(this, out result, member, parameter, specialParameters,
                                                             false,
                                                             parameters);
        }

        #endregion

        #region Get all

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAll(Type service, object key,
                                          IDictionary<string, object> specialParameters = null,
                                          params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.GetAll(this, service, null, null, specialParameters, false, parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAll(Type service,
                                          IDictionary<string, object> specialParameters,
                                          params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.GetAll(this, service, null, null, specialParameters, false, parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAll(Type service,
                                          params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.GetAll(this, service, null, null,
                                                 InjectorUtilsInternal.ReadOnlyEmptyDictionary, true, parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAllInto(Type service, object key, MemberInfo member,
                                              ParameterInfo parameter = null,
                                              IDictionary<string, object> specialParameters = null,
                                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.GetAll(this, service, member, parameter, specialParameters, false, parameters);
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="service">The specified service type.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<object> GetAllInto(Type service, MemberInfo member, ParameterInfo parameter = null,
                                              IDictionary<string, object> specialParameters = null,
                                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.GetAll(this, service, member, parameter, specialParameters, false, parameters);
        }


        //-------------------

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAll<T>(object key, IDictionary<string, object> specialParameters = null,
                                        params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAll(this, typeof(T), null, null, specialParameters, false,
                                                       parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAll<T>(IDictionary<string, object> specialParameters,
                                        params IInjectionParameter[] parameters)
        {
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAll(this, typeof(T), null, null, specialParameters, false,
                                                       parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAll<T>(params IInjectionParameter[] parameters)
        {
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAll(this, typeof(T), null, null,
                                                       InjectorUtilsInternal.ReadOnlyEmptyDictionary, true, parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAllInto<T>(object key, MemberInfo member, ParameterInfo parameter = null,
                                            IDictionary<string, object> specialParameters = null,
                                            params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAll(this, typeof(T), member, parameter, specialParameters, false,
                                                       parameters));
        }

        /// <summary>
        /// Gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns>A series of instances of the service.</returns>
        public IEnumerable<T> GetAllInto<T>(MemberInfo member, ParameterInfo parameter = null,
                                            IDictionary<string, object> specialParameters = null,
                                            params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorUtilsInternal
                .Cast<T>(InjectorExtensionUtils.GetAll(this, typeof(T), member, parameter, specialParameters, false,
                                                       parameters));
        }

        #endregion

        #region Try get all

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAll(Type service, out IEnumerable<object> result, object key,
                              IDictionary<string, object> specialParameters = null,
                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAll(this, out result, service, null, null, specialParameters, false,
                                                    parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAll(Type service, out IEnumerable<object> result,
                              IDictionary<string, object> specialParameters,
                              params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAll(this, out result, service, null, null, specialParameters, false,
                                                    parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAll(Type service, out IEnumerable<object> result,
                              params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAll(this, out result, service, null, null,
                                                    InjectorUtilsInternal.ReadOnlyEmptyDictionary, true, parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInto(Type service, out IEnumerable<object> result, object key, MemberInfo member,
                                  ParameterInfo parameter = null,
                                  IDictionary<string, object> specialParameters = null,
                                  params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAll(this, out result, service, member, parameter, specialParameters,
                                                    false, parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="service">The specified service type.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInto(Type service, out IEnumerable<object> result, MemberInfo member,
                                  ParameterInfo parameter = null,
                                  IDictionary<string, object> specialParameters = null,
                                  params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.TryGetAll(this, out result, service, member, parameter, specialParameters,
                                                    false, parameters);
        }

        //--------------

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAll<T>(out IEnumerable<T> result, object key,
                                 IDictionary<string, object> specialParameters = null,
                                 params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAll(this, out result, null, null, specialParameters, false, parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAll<T>(out IEnumerable<T> result,
                                 IDictionary<string, object> specialParameters,
                                 params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAll(this, out result, null, null, specialParameters, false, parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAll<T>(out IEnumerable<T> result, params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.TryGetAll(this, out result, null, null,
                                                    InjectorUtilsInternal.ReadOnlyEmptyDictionary, true, parameters);
        }


        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInto<T>(out IEnumerable<T> result, object key, MemberInfo member,
                                     ParameterInfo parameter = null,
                                     IDictionary<string, object> specialParameters = null,
                                     params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.TryGetAll(this, out result, member, parameter, specialParameters, false,
                                                    parameters);
        }

        /// <summary>
        /// Try gets all available instances of the specified service in the specified <see cref="IInjector"/> include all of its parent <see cref="IInjector"/>.
        /// </summary>
        /// <param name="result">A series of instances of the service.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool TryGetAllInto<T>(out IEnumerable<T> result, MemberInfo member, ParameterInfo parameter = null,
                                     IDictionary<string, object> specialParameters = null,
                                     params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.TryGetAll(this, out result, member, parameter, specialParameters, false,
                                                    parameters);
        }

        #endregion

        #region Binding

        #region Bind

        /// <summary>
        /// Declares a binding for the specified service.
        /// </summary>
        /// <param name="services">The specified service <see cref="Type"/>(s).</param>
        /// <returns>The fluent syntax.</returns>
        public IBindingSyntax Bind(params Type[] services)
        {
            return InjectorExtensionUtils.Bind(this, false, services);
        }

        /// <summary>
        /// Declares a binding for the specified service <see cref="T"/>.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T> Bind<T>()
        {
            return InjectorExtensionUtils.Bind<T>(this, false);
        }

        /// <summary>
        /// Declares a binding for the specified services.
        /// </summary>
        /// <typeparam name="T1">The specified service type.</typeparam>
        /// <typeparam name="T2">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T1, T2> Bind<T1, T2>()
        {
            return InjectorExtensionUtils.Bind<T1, T2>(this, false);
        }

        /// <summary>
        /// Declares a binding for the specified services.
        /// </summary>
        /// <typeparam name="T1">The specified service type.</typeparam>
        /// <typeparam name="T2">The specified service type.</typeparam>
        /// <typeparam name="T3">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T1, T2, T3> Bind<T1, T2, T3>()
        {
            return InjectorExtensionUtils.Bind<T1, T2, T3>(this, false);
        }

        /// <summary>
        /// Declares a binding for the specified services.
        /// </summary>
        /// <typeparam name="T1">The specified service type.</typeparam>
        /// <typeparam name="T2">The specified service type.</typeparam>
        /// <typeparam name="T3">The specified service type.</typeparam>
        /// <typeparam name="T4">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T1, T2, T3, T4> Bind<T1, T2, T3, T4>()
        {
            return InjectorExtensionUtils.Bind<T1, T2, T3, T4>(this, false);
        }


        /// <summary>
        /// Declares a binding for the specified service.
        /// </summary>
        /// <param name="services">The specified service <see cref="Type"/>(s).</param>
        /// <returns>The fluent syntax.</returns>
        public IBindingSyntax BindWithManualBuild(params Type[] services)
        {
            return InjectorExtensionUtils.Bind(this, true, services);
        }

        /// <summary>
        /// Declares a binding for the specified service <see cref="T"/>.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T> BindWithManualBuild<T>()
        {
            return InjectorExtensionUtils.Bind<T>(this, true);
        }

        /// <summary>
        /// Declares a binding for the specified services.
        /// </summary>
        /// <typeparam name="T1">The specified service type.</typeparam>
        /// <typeparam name="T2">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T1, T2> BindWithManualBuild<T1, T2>()
        {
            return InjectorExtensionUtils.Bind<T1, T2>(this, true);
        }

        /// <summary>
        /// Declares a binding for the specified services.
        /// </summary>
        /// <typeparam name="T1">The specified service type.</typeparam>
        /// <typeparam name="T2">The specified service type.</typeparam>
        /// <typeparam name="T3">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T1, T2, T3> BindWithManualBuild<T1, T2, T3>()
        {
            return InjectorExtensionUtils.Bind<T1, T2, T3>(this, true);
        }

        /// <summary>
        /// Declares a binding for the specified services.
        /// </summary>
        /// <typeparam name="T1">The specified service type.</typeparam>
        /// <typeparam name="T2">The specified service type.</typeparam>
        /// <typeparam name="T3">The specified service type.</typeparam>
        /// <typeparam name="T4">The specified service type.</typeparam>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T1, T2, T3, T4> BindWithManualBuild<T1, T2, T3, T4>()
        {
            return InjectorExtensionUtils.Bind<T1, T2, T3, T4>(this, true);
        }

        /// <summary>
        /// Declares a binding for the specified service <see cref="T"/>.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <typeparam name="TTypeTo">Type to bind specified service. </typeparam>
        /// <returns>The fluent syntax.</returns>
        public ITypeCallbackConstructorObjectPriorityScopeUseWhenWithSyntax<TTypeTo> BindTo<T, TTypeTo>(
            ) where TTypeTo : T
        {
            return InjectorExtensionUtils.BindTo<T, TTypeTo>(this, false);
        }

        /// <summary>
        /// Declares a binding for the specified service <see cref="T"/>.
        /// </summary>
        /// <typeparam name="T">The specified service type.</typeparam>
        /// <typeparam name="TTypeTo">Type to bind specified service. </typeparam>
        /// <returns>The fluent syntax.</returns>
        public ITypeCallbackConstructorObjectPriorityScopeUseWhenWithSyntax<TTypeTo> BindToWithManualBuild<T, TTypeTo>(
            ) where TTypeTo : T
        {
            return InjectorExtensionUtils.BindTo<T, TTypeTo>(this, true);
        }

        #endregion

        #region Rebind

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services, and declares a new one.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IBindingSyntax Rebind(Type type, object key,
                                     IDictionary<string, object> specialParameters = null,
                                     params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Rebind(this, type, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services, and declares a new one.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IBindingSyntax Rebind(Type type, IDictionary<string, object> specialParameters,
                                     params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.Rebind(this, type, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services, and declares a new one.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IBindingSyntax Rebind(Type type, params IInjectionParameter[] parameters)
        {
            if (parameters == null || parameters.Length == 0)
                return InjectorExtensionUtils.Rebind(this, type);
            return InjectorExtensionUtils.Rebind(this, type, null, null, InjectorUtilsInternal.ReadOnlyEmptyDictionary,
                                                 parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services, and declares a new one.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IBindingSyntax RebindInto(Type type, object key, MemberInfo member, ParameterInfo parameter = null,
                                         IDictionary<string, object> specialParameters = null,
                                         params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Rebind(this, type, member, parameter, specialParameters, parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services, and declares a new one.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IBindingSyntax RebindInto(Type type, MemberInfo member, ParameterInfo parameter = null,
                                         IDictionary<string, object> specialParameters = null,
                                         params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.Rebind(this, type, member, parameter, specialParameters, parameters);
        }

        //----------

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services <see cref="T"/>, and declares a new one.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T> Rebind<T>(object key,
                                                  IDictionary<string, object> specialParameters = null,
                                                  params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Rebind<T>(this, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services <see cref="T"/>, and declares a new one.
        /// </summary>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T> Rebind<T>(IDictionary<string, object> specialParameters,
                                                  params IInjectionParameter[] parameters)
        {
            return InjectorExtensionUtils.Rebind<T>(this, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services <see cref="T"/>, and declares a new one.
        /// </summary>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T> Rebind<T>(params IInjectionParameter[] parameters)
        {
            if (parameters == null || parameters.Length == 0)
                return InjectorExtensionUtils.Rebind<T>(this);
            return InjectorExtensionUtils.Rebind<T>(this, null, null, InjectorUtilsInternal.ReadOnlyEmptyDictionary,
                                                    parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services <see cref="T"/>, and declares a new one.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T> RebindInto<T>(object key, MemberInfo member, ParameterInfo parameter = null,
                                                      IDictionary<string, object> specialParameters = null,
                                                      params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Rebind<T>(this, member, parameter, specialParameters, parameters);
        }

        /// <summary>
        /// Removes any existing bindings with specified condition for the specified services <see cref="T"/>, and declares a new one.
        /// </summary>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public IGenericBindingSyntax<T> RebindInto<T>(MemberInfo member, ParameterInfo parameter = null,
                                                      IDictionary<string, object> specialParameters = null,
                                                      params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.Rebind<T>(this, member, parameter, specialParameters, parameters);
        }

        #endregion

        #region Unbind

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters">The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void Unbind(Type type, object key,
                           IDictionary<string, object> specialParameters = null, params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            InjectorExtensionUtils.Unbind(this, type, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void Unbind(Type type, IDictionary<string, object> specialParameters,
                           params IInjectionParameter[] parameters)
        {
            InjectorExtensionUtils.Unbind(this, type, null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void Unbind(Type type, params IInjectionParameter[] parameters)
        {
            if (parameters == null || parameters.Length == 0)
            {
                InjectorExtensionUtils.Unbind(this, type);
                return;
            }
            InjectorExtensionUtils.Unbind(this, type, null, null, InjectorUtilsInternal.ReadOnlyEmptyDictionary,
                                          parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void UnbindInto(Type type, object key, MemberInfo member, ParameterInfo parameter = null,
                               IDictionary<string, object> specialParameters = null,
                               params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            InjectorExtensionUtils.Unbind(this, type, member, parameter, specialParameters, parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="type">The specified service type.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void UnbindInto(Type type, MemberInfo member, ParameterInfo parameter = null,
                               IDictionary<string, object> specialParameters = null,
                               params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            InjectorExtensionUtils.Unbind(this, type, member, parameter, specialParameters, parameters);
        }

        //------------

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void Unbind<T>(object key,
                              IDictionary<string, object> specialParameters = null,
                              params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            InjectorExtensionUtils.Unbind(this, typeof(T), null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void Unbind<T>(IDictionary<string, object> specialParameters, params IInjectionParameter[] parameters)
        {
            InjectorExtensionUtils.Unbind(this, typeof(T), null, null, specialParameters, parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void Unbind<T>(params IInjectionParameter[] parameters)
        {
            if (parameters == null || parameters.Length == 0)
            {
                InjectorExtensionUtils.Unbind(this, typeof(T));
                return;
            }
            InjectorExtensionUtils.Unbind(this, typeof(T), null, null, InjectorUtilsInternal.ReadOnlyEmptyDictionary,
                                          parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void UnbindInto<T>(object key, MemberInfo member, ParameterInfo parameter = null,
                                  IDictionary<string, object> specialParameters = null,
                                  params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            InjectorExtensionUtils.Unbind(this, typeof(T), member, parameter, specialParameters, parameters);
        }

        /// <summary>
        /// Unregisters all bindings with specified conditions for the specified service.
        /// </summary>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service. </param>
        /// <param name="parameters"> The specified parameters.</param>
        /// <returns>The fluent syntax.</returns>
        public void UnbindInto<T>(MemberInfo member, ParameterInfo parameter = null,
                                  IDictionary<string, object> specialParameters = null,
                                  params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            InjectorExtensionUtils.Unbind(this, typeof(T), member, parameter, specialParameters, parameters);
        }

        #endregion

        #region Can resolve

        /// <summary>
        /// Determines whether the specified request can be resolved.
        /// </summary>
        /// <param name="service">Service for resolve.</param>
        /// <param name="parameters">Parameters for service. </param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="searchInParent">If set to <c>true</c> search in parent bindings.</param>
        /// <param name="includeImplicitBindings">If set to <c>fals</c> implicit bindings are ignored.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool CanResolve(Type service, object key, bool searchInParent = true, bool includeImplicitBindings = false,
                               IDictionary<string, object> specialParameters = null,
                               params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.CanResolve(this, service, null, null, parameters, specialParameters,
                                                     searchInParent,
                                                     includeImplicitBindings);
        }

        /// <summary>
        /// Determines whether the specified request can be resolved.
        /// </summary>
        /// <param name="service">Service for resolve.</param>
        /// <param name="parameters">Parameters for service. </param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="searchInParent">If set to <c>true</c> search in parent bindings.</param>
        /// <param name="includeImplicitBindings">If set to <c>false</c> implicit bindings are ignored.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool CanResolve(Type service, bool searchInParent = true, bool includeImplicitBindings = false,
                               IDictionary<string, object> specialParameters = null,
                               params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.CanResolve(this, service, null, null, parameters, specialParameters,
                                                     searchInParent,
                                                     includeImplicitBindings);
        }

        /// <summary>
        /// Determines whether the specified request can be resolved.
        /// </summary>
        /// <param name="service">Service for resolve.</param>
        /// <param name="parameters">Parameters for service. </param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="searchInParent">If set to <c>true</c> search in parent bindings.</param>
        /// <param name="includeImplicitBindings">If set to <c>false</c> implicit bindings are ignored.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool CanResolveInto(Type service, object key, MemberInfo member, ParameterInfo parameter = null,
                                   bool includeImplicitBindings = true, bool searchInParent = false,
                                   IDictionary<string, object> specialParameters = null,
                                   params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.CanResolve(this, service, member, parameter, parameters, specialParameters,
                                                     searchInParent,
                                                     includeImplicitBindings);
        }

        /// <summary>
        /// Determines whether the specified request can be resolved.
        /// </summary>
        /// <param name="service">Service for resolve.</param>
        /// <param name="parameters">Parameters for service. </param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for resolve current service.</param>
        /// <param name="searchInParent">If set to <c>true</c> search in parent bindings.</param>
        /// <param name="includeImplicitBindings">If set to <c>false</c> implicit bindings are ignored.</param>
        /// <returns><c>True</c> if the specified service has been resolved; otherwise, <c>false</c>.</returns>
        public bool CanResolveInto(Type service, MemberInfo member, ParameterInfo parameter = null,
                                   bool searchInParent = true, bool includeImplicitBindings = false,
                                   IDictionary<string, object> specialParameters = null,
                                   params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.CanResolve(this, service, member, parameter, parameters, specialParameters,
                                                     searchInParent,
                                                     includeImplicitBindings);
        }

        #endregion

        #endregion

        #region Release object in scope

        /// <summary>
        /// Release specified service with specified condition in scope.
        /// </summary>
        /// <param name="service">Service for release.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="specialParameters">Special parameters for release specified service.</param>
        /// <param name="needDispose">Try dispose object.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been release; otherwise, <c>false</c>.</returns>
        public bool Release(Type service, object key, bool needDispose = true,
                            IDictionary<string, object> specialParameters = null,
                            params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Release(this, service, null, null, specialParameters, needDispose, parameters);
        }

        /// <summary>
        /// Release specified service with specified condition in scope.
        /// </summary>
        /// <param name="service">Service for release.</param>
        /// <param name="specialParameters">Special parameters for release specified service.</param>
        /// <param name="needDispose">Try dispose object.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been release; otherwise, <c>false</c>.</returns>
        public bool Release(Type service, bool needDispose = true, IDictionary<string, object> specialParameters = null,
                            params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.Release(this, service, null, null, specialParameters, needDispose, parameters);
        }

        /// <summary>
        /// Release specified service with specified condition in scope.
        /// </summary>
        /// <param name="service">Service for release.</param>
        /// <param name="key">The specified binding key.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for release specified service.</param>
        /// <param name="needDispose">Try dispose object.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been release; otherwise, <c>false</c>.</returns>
        public bool ReleaseInto(Type service, object key,
                                MemberInfo member, ParameterInfo parameter = null, bool needDispose = true,
                                IDictionary<string, object> specialParameters = null,
                                params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = new Dictionary<string, object>();
            SpecialParameterKeys.SetKeyedBindingParameter(specialParameters, key);
            return InjectorExtensionUtils.Release(this, service, member, parameter, specialParameters, needDispose,
                                                  parameters);
        }

        /// <summary>
        /// Release specified service with specified condition in scope.
        /// </summary>
        /// <param name="service">Service for release.</param>
        /// <param name="member">The specified <see cref="MemberInfo"/> target that will receive the injection.</param>  
        /// <param name="parameter">The specifeid <see cref="ParameterInfo"/> that will receive the injection.</param>
        /// <param name="specialParameters">Special parameters for release specified service.</param>
        /// <param name="needDispose">Try dispose object.</param>
        /// <param name="parameters">The specified parameters. </param>
        /// <returns><c>True</c> if the specified service has been release; otherwise, <c>false</c>.</returns>
        public bool ReleaseInto(Type service, MemberInfo member, ParameterInfo parameter = null, bool needDispose = true,
                                IDictionary<string, object> specialParameters = null,
                                params IInjectionParameter[] parameters)
        {
            if (specialParameters == null)
                specialParameters = InjectorUtilsInternal.ReadOnlyEmptyDictionary;
            return InjectorExtensionUtils.Release(this, service, member, parameter, specialParameters, needDispose,
                                                  parameters);
        }

        #endregion

        #region Create child container

        /// <summary>
        /// Create a child <see cref="IInjector"/>, by default, components are cloned from the parent.
        /// </summary>
        /// <param name="modules">The specified <see cref="IInjectorModule"/> for new <see cref="IInjector"/></param>
        /// <returns>An instacne of child <see cref="IInjector"/>.</returns>
        public IInjector CreateChild(params IInjectorModule[] modules)
        {
            return CreateChild(Settings.Clone(),
                               new ComponentContainer(), true,
                               InjectorUtilsInternal.EmptyComponents,
                               modules);
        }

        /// <summary>
        /// Create a child <see cref="IInjector"/>, by default, components are cloned from the parent.
        /// </summary>
        /// <param name="components">The specified <see cref="IComponent"/>(s).</param>
        /// <param name="modules">The specified <see cref="IInjectorModule"/> for new <see cref="IInjector"/></param>
        /// <returns>An instacne of child <see cref="IInjector"/>.</returns>
        public IInjector CreateChild(IList<IComponent> components, params IInjectorModule[] modules)
        {
            return CreateChild(Settings.Clone(), new ComponentContainer(), true, components, modules);
        }

        /// <summary>
        /// Create a child <see cref="IInjector"/>, by default, components are cloned from the parent.
        /// </summary>
        /// <param name="settings">Settings for child <see cref="IInjector"/>.</param>
        /// <param name="modules">The specified <see cref="IInjectorModule"/> for new <see cref="IInjector"/></param>
        /// <returns>An instacne of child <see cref="IInjector"/>.</returns>
        public IInjector CreateChild(IInjectorSettings settings, params IInjectorModule[] modules)
        {
            return CreateChild(settings, new ComponentContainer(), true, InjectorUtilsInternal.EmptyComponents, modules);
        }

        /// <summary>
        /// Create a child <see cref="IInjector"/>, by default, components are cloned from the parent.
        /// </summary>
        /// <param name="settings">Settings for child <see cref="IInjector"/>.</param>
        /// <param name="componentContainer">The specified <see cref="IComponentContainer"/>. </param>
        /// <param name="modules">The specified <see cref="IInjectorModule"/> for new <see cref="IInjector"/></param>
        /// <returns>An instacne of child <see cref="IInjector"/>.</returns>
        public IInjector CreateChild(IInjectorSettings settings, IComponentContainer componentContainer,
                                     params IInjectorModule[] modules)
        {
            return CreateChild(settings, componentContainer, true, InjectorUtilsInternal.EmptyComponents, modules);
        }

        /// <summary>
        /// Create a child <see cref="IInjector"/>.
        /// </summary>
        /// <param name="settings">Settings for child <see cref="IInjector"/>.</param>
        /// <param name="componentContainer">The specified <see cref="IComponentContainer"/>. </param>
        /// <param name="cloneComponents">Specifies whether to clone the components from the parent.</param>
        /// <param name="modules">The specified <see cref="IInjectorModule"/> for new <see cref="IInjector"/></param>
        /// <returns>An instacne of child <see cref="IInjector"/>.</returns>
        public IInjector CreateChild(IInjectorSettings settings, IComponentContainer componentContainer,
                                     bool cloneComponents, params IInjectorModule[] modules)
        {
            return CreateChild(settings, componentContainer, cloneComponents, InjectorUtilsInternal.EmptyComponents,
                               modules);
        }

        #endregion

        #region Modules

        /// <summary>
        /// Creates a new instance of the module and loads it into the <see cref="IInjector"/>.
        /// </summary>
        /// <typeparam name="T">The type of the module.</typeparam>
        public void Load<T>() where T : IInjectorModule
        {
            Load(typeof(T));
        }

        /// <summary>
        /// Unloads the module with the specified <see cref="T"/>.
        /// </summary>
        /// <typeparam name="T">The type of the module.</typeparam>
        public void Unload<T>() where T : IInjectorModule
        {
            Unload(typeof(T));
        }

        /// <summary>
        /// Loads the module(s) into the <see cref="IInjector"/>.
        /// </summary>
        /// <param name="modules">The specified modules.</param>
        public void Load(IEnumerable<IInjectorModule> modules)
        {
            Validate.ArgumentNotNull(modules, "modules");
            foreach (var injectorModule in modules)
            {
                Load(injectorModule);
            }
        }

        /// <summary>
        /// Loads modules defined in the specified assemblies.
        /// </summary>
        /// <param name="assemblies">The assemblies to search.</param>
        public void LoadModules(params Assembly[] assemblies)
        {
            InjectorExtensionUtils.LoadModules(this, assemblies);
        }

        #endregion

        #region Inject

        /// <summary>
        /// Inject property, method, fields in specified object.
        /// </summary>
        /// <param name="target">The specified object for inject.</param>
        /// <param name="parameters"> The specified <see cref="IInjectionParameter"/>.</param>
        public void Inject<T>(ref T target, params IInjectionParameter[] parameters)
        {
            Validate.ArgumentNotNull(target, "target");
            Inject(ref target, CreateContext(target.GetType(), null, null, parameters,
                                             InjectorUtilsInternal.ReadOnlyEmptyDictionary));
        }

        /// <summary>
        /// Inject property, method, fields in specified object.
        /// </summary>
        /// <param name="target">The specified object for inject.</param>
        /// <param name="parameters"> The specified <see cref="IInjectionParameter"/>.</param>
        public void Inject<T>(T target, params IInjectionParameter[] parameters) where T : class
        {
            Validate.ArgumentNotNull(target, "target");
            Inject(ref target, CreateContext(target.GetType(), null, null, parameters,
                                             InjectorUtilsInternal.ReadOnlyEmptyDictionary));
        }

        #endregion

        #region Decorators

        /// <summary>
        /// Decorate all components implementing service <typeparamref name="TService"/> using the provided <paramref name="decorator"/> function.
        /// </summary>
        /// <typeparam name="TService">Service type being decorated.</typeparam>
        /// <param name="decorator">Function decorating a component instance.</param>
        public IDynamicConverter BindAsDecoratorForAll<TService>(Func<IBindingContext, TService, TService> decorator)
        {
            return InjectorExtensionUtils.BindAsDecoratorForAll<TService>(this, decorator);
        }

        /// <summary>
        /// Decorate components with specified condition implementing service <typeparamref name="TService"/> using the provided <paramref name="decorator"/> function.
        /// </summary>
        /// <typeparam name="TService">Service type being decorated.</typeparam>
        /// <param name="buildCondition">The specified delegate to build condition.</param>
        /// <param name="decorator">Function decorating a component instance.</param>
        public IDynamicConverter BindAsDecoratorFor<TService>(Action<IConditionBuilder<TService>> buildCondition, Func<IBindingContext, TService, TService> decorator)
        {
            return InjectorExtensionUtils.BindAsDecoratorFor<TService>(this, buildCondition, decorator);
        }

        /// <summary>
        /// Unregisters all decorators for the specified service.
        /// </summary>
        public bool UnbindAllDecoratorsFor<TService>()
        {
            return InjectorExtensionUtils.UnbindAllDecoratorsFor<TService>(this);
        }

        /// <summary>
        /// Unregisters decorators for the specified service, with specific condition.
        /// </summary>
        /// <param name="member">Type when injected specified service.</param>
        /// <param name="parameter"> </param>
        /// <param name="specialParameters"> </param>
        /// <param name="parameters">The specified binding parameters. </param>
        public bool UnbindDecoratorsFor<TService>(MemberInfo member, ParameterInfo parameter,
                                                         IDictionary<string, object> specialParameters, IList<IInjectionParameter> parameters)
        {
            return InjectorExtensionUtils.UnbindDecoratorsFor<TService>(this, member, parameter, specialParameters, parameters);
        }

        #endregion

        #region Adapters

        /// <summary>
        /// Adapts all components implementing service <typeparamref name="TFrom"/> to provide <typeparamref name="TTo"/> using the provided <paramref name="adapter"/> function.
        /// </summary>
        /// <typeparam name="TFrom">Service type to adapt from.</typeparam>
        /// <typeparam name="TTo">Service type to adapt to. Must not be the same as <typeparamref name="TFrom"/>.</typeparam>
        /// <param name="adapter">Function adapting <typeparamref name="TFrom"/> to service <typeparamref name="TTo"/>.</param>
        public IDynamicConverter BindAsAdapterForAll<TFrom, TTo>(Func<IBindingContext, TFrom, TTo> adapter)
        {
            return InjectorExtensionUtils.BindAsAdapterForAll<TFrom, TTo>(this, adapter);
        }

        /// <summary>
        /// Adapts components with specified condition implementing service <typeparamref name="TFrom"/> to provide <typeparamref name="TTo"/> using the provided <paramref name="adapter"/> function.
        /// </summary>
        /// <typeparam name="TFrom">Service type to adapt from.</typeparam>
        /// <typeparam name="TTo">Service type to adapt to. Must not be the same as <typeparamref name="TFrom"/>.</typeparam>
        /// <param name="buildCondition">The specified delegate to build condition.</param>
        /// <param name="adapter">Function adapting <typeparamref name="TFrom"/> to service <typeparamref name="TTo"/>.</param>
        public IDynamicConverter BindAsAdapterFor<TFrom, TTo>(Action<IConditionBuilder<TTo>> buildCondition, Func<IBindingContext, TFrom, TTo> adapter)
        {
            return InjectorExtensionUtils.BindAsAdapterFor<TFrom, TTo>(this, buildCondition, adapter);
        }

        /// <summary>
        /// Unregisters all adapters for the specified service.
        /// </summary>
        public bool UnbindAllAdaptersFor<TFrom, TTo>()
        {
            return InjectorExtensionUtils.UnbindAllAdaptersFor<TFrom, TTo>(this);
        }

        /// <summary>
        /// Unregisters adapters for the specified service, with specific condition.
        /// </summary>
        /// <param name="member">Type when injected specified service.</param>
        /// <param name="parameter"> </param>
        /// <param name="specialParameters">The special parameters.</param>
        /// <param name="parameters">The specified binding parameters. </param>
        public bool UnbindAdaptersFor<TFrom, TTo>(MemberInfo member, ParameterInfo parameter,
                                                         IDictionary<string, object> specialParameters, IList<IInjectionParameter> parameters)
        {
            return InjectorExtensionUtils.UnbindAdaptersFor<TFrom, TTo>(this, member, parameter, specialParameters, parameters);
        }

        #endregion
#endif

        #endregion

        #region Overrides of InjectorBase

        /// <summary>
        /// Creates a child <see cref="IInjector"/> for the current <see cref="IInjector"/>.
        /// </summary>
        /// <param name="settings">The specified settings for the child <see cref="IInjector"/>.</param>
        /// <param name="componentContainer">The specified <see cref="IComponentContainer"/>. </param>
        /// <param name="components">The specified <see cref="IComponent"/> for new <see cref="IInjector"/></param>
        /// <param name="modules">The specified <see cref="InjectorModule"/> for new <see cref="IInjector"/></param>
        /// <returns>An instance of <see cref="IInjector"/>.</returns>
        protected override IInjector CreateChildInjector(IInjectorSettings settings,
                                                         IComponentContainer componentContainer,
                                                         IList<IComponent> components, params IInjectorModule[] modules)
        {
            return new MugenInjector(settings, componentContainer, components, modules);
        }

        #endregion
    }
}